#lang rosetta-racket


(require "pipe-walk.rkt")

(provide pipe-walk-cube
         pipe-walk-cube-example)


(define (pipe-walk-cube c r l n)
  (pipe-walk
   c
   ux
   l
   n
   (λ (p1)
     (let ((v (-c p1 c)))
       (and (< (abs (xyz-x v)) r)
            (< (abs (xyz-y v)) r)
            (< (abs (xyz-z v)) r))))))

(define (pipe-walk-cube-example)
  (pipe-walk-cube u0 100 80 2000))